let ruleData = {
	
	// 普通输入框，可任意输入
	inputRule: {required: true,message: '请输入正确内容',trigger: ['blur']},
	inputRule_notMust: {message: '内容输入有误',trigger: ['blur']},
	
	// 普通选择————是否公式
	disRule: {required: true,message: '请选择',trigger: ['blur']},
	disRule_notMust: {message: '请选择',trigger: ['blur']},
	
	// 手机号码
	mobileRule:[
		{required: true,type: 'number',message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { return uni.$u.test.mobile(value);},message: '内容格式有误',trigger: ['blur'],}
	],
	mobileRule_notMust:[
		{type: 'number',message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { return uni.$u.test.mobile(value);},message: '内容格式有误',trigger: ['blur'],}
	],
	
	// 电话或手机号
	telRule:[
		{required: true,message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { 
			// let reg = /^(\d{4}-)?\d{6,11}$/;
			let reg = /^0\d{2,3}-?\d{7,8}$/;
			if(reg.test(value) || uni.$u.test.mobile(value)){
				return true
			}else{
				return false
			}
		},message: '请输入正确的手机号或座机号',trigger: ['blur'],}
	],
	telRule_notMust:[
		{message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => {
			// let reg = /^(\d{4}-)?\d{6,11}$/;
			let reg = /^0\d{2,3}-?\d{7,8}$/;
			if(reg.test(value) || uni.$u.test.mobile(value)){
				return true
			}else{
				return false
			}
		},message: '请输入正确的手机号或座机号',trigger: ['blur'],}
	],
	
	// 电子邮箱
	emailRule:[
		{required: true,type: 'string',message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { return uni.$u.test.email(value);},message: '内容格式有误',trigger: ['blur'],}
	],
	emailRule_notMust:[
		{type: 'string',message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { return uni.$u.test.email(value);},message: '内容格式有误',trigger: ['blur'],}
	],
	
	// 身份证号
	idCardRule:[
		{required: true,message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { return uni.$u.test.idCard(value);},message: '内容格式有误',trigger: ['blur'],}
	],
	idCardRule_notMust:[
		{message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { return uni.$u.test.idCard(value);},message: '内容格式有误',trigger: ['blur'],}
	],
	
	
	// 非负数————金额
	moneyRule:[
		{required: true,type: 'number',message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { const regex = /^[0-9]+(\.[0-9]+)?$/; return regex.test(value);},message: '内容格式应为非负数',trigger: ['blur'],}
	],
	moneyRule_notMust:[
		{type: 'number',message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { const regex = /^[0-9]+(\.[0-9]+)?$/; return regex.test(value);},message: '内容格式应为非负数',trigger: ['blur'],}
	],
	// 正整数————人数、银行卡号等纯数字
	peopleRule:[
		{required: true,type: 'number',message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { return uni.$u.test.digits(value);},message: '内容格式应为正整数',trigger: ['blur'],}
	],
	peopleRule_notMust:[
		{type: 'number',message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { return uni.$u.test.digits(value);},message: '内容格式应为正整数',trigger: ['blur'],}
	],
	// 大于0的非负数————总金额
	total_moneyRule:[
		{required: true,type: 'number',message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { const regex = 	/^(?!(0[0-9]{0,}$))[0-9]{1,}[.]{0,}[0-9]{0,}$/; return regex.test(value);},message: '内容格式应为大于0的数字',trigger: ['blur'],}
	],
	total_moneyRule_notMust:[
		{type: 'number',message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { const regex = 	/^(?!(0[0-9]{0,}$))[0-9]{1,}[.]{0,}[0-9]{0,}$/; return regex.test(value);},message: '内容格式应为大于0的数字',trigger: ['blur'],}
	],
	// 正整数————总人数
	total_peopleRule:[
		{required: true,type: 'number',message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { const regex = 	/^[1-9]\d*$/; return regex.test(value);},message: '内容格式应为大于0的正整数',trigger: ['blur'],}
	],
	total_peopleRule_notMust:[
		{type: 'number',message: '请输入正确内容',trigger: ['blur']},
		{validator: (rule, value, callback) => { const regex = 	/^[1-9]\d*$/; return regex.test(value);},message: '内容格式应为大于0的正整数',trigger: ['blur'],}
	],
	
	
}


export default ruleData